package jp.dev7.hongo2;

import java.util.List;

import jp.dev7.hongo2.entity.Question;
import jp.dev7.hongo2.util.Db4oHelper;
import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;

public class QuestionList extends ListActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		Db4oHelper db = new Db4oHelper(this);
		List<Question> list = db.findAllQuestion();

		ListAdapter adapter = new ArrayAdapter<Question>(this,
				android.R.layout.simple_list_item_1, list);
		setListAdapter(adapter);
	}
}
